package indi.zhifa.study2024.nbr.business.curd.item.dao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import indi.zhifa.core.mpenhance.entity.annotations.ZfDbService;
import indi.zhifa.core.mpenhance.service.impl.ZfDbServiceImpl;
import indi.zhifa.study2024.nbr.business.curd.item.dao.mapper.ItemDefineMapper;
import indi.zhifa.study2024.nbr.business.curd.item.dao.service.IItemDefineDbService;
import indi.zhifa.study2024.nbr.business.curd.item.entity.po.ItemDefineEntity;

/**
 * <p>
 * 商品定义表 服务实现类
 * </p>
 *
 * @author 织法
 * @since 2024-09-16
 */
@ZfDbService(name="ItemDefineEntity")
public class ItemDefineDbServiceImpl extends ZfDbServiceImpl<ItemDefineMapper, ItemDefineEntity> implements IItemDefineDbService {

    @Override
    public ItemDefineEntity findByName(String name) {
        LambdaQueryWrapper<ItemDefineEntity> queryWrapper = Wrappers.<ItemDefineEntity>lambdaQuery()
                .eq(ItemDefineEntity::getName, name);
        return findOne(queryWrapper);
    }
}
